/**
 * LFOA 移动办公常量
 * @date   16/3/1
 * @description []
 */
(function (lf, w) {
    
    //工单信息,主要用在task_processing/task_processing_detail/processDetail
    lf.taskInfo = {
        FLOWING: 'flowing', //流转中
    };
    
    //常量
    lf.approvalInfo = {
        //字面字符串一定要定义成常量。能否出现多次，改死你！
        APPROVING: 'approving',
        APPROVED: 'approved',
        APPLY: 'apply',
    };
    
    
    //图片前缀url,或完整url
    lf.imgUrl = {
        //开发时用此图片来占位
        none: '../public/images/common/none.png',
        
        //审批流要用到的图片
        approval: '../public/images/approval/',
    };
    
    /**
     * 定义后台 api 地址
     * @type {{}}
     */
    lf.api = {
        //权限模块
        //父菜单id【0:父菜单, 非0:获取该菜单的子菜单】
        menuList: '/api/work/auth/getSysMenuList',
        
        //系统字典模块
        dictList: '/api/common/sys/dictList',
        
        //小区列表
        projectList: '/api/work/project/getProjectByStaff',
        
        //抢单列表
        rushList: '/api/work/event/getGrabEventReportList',
        
        //签收列表
        signForList: '/api/work/event/getSignForEventReportList',
        
        
        //抢单/签收/工单列表头部
        listHeader: '/api/work/event/getCountsToHead',
        
        //抢单/签收
        doRush: '/api/work/event/signforEventReport',
        
        //通讯录/协助办理人
        addressBook: '/api/work/staff/getStaffContact',
        
        //物业员工信息
        staffInfo: '/api/work/staff/getStaff',
        
        //权限模块
        available: {
            // 手机号码有效性
            mobileAvailable: '/api/work/auth/checkMobileAvailable',
        },
        
        //考勤模块
        
        attendance: {
            
            //考勤记录列表
            list: '/api/work/attendance/list', //get
            
            //考勤登记
            create: '/api/work/attendance/create', //post
            
            //我的考勤记录
            recordList: '/api/work/attendance/findAttendanceRecordList', //get
            
            //班次定义列表
            defineList: '/api/work/attendance/getSchedulingList', //get 

            //获取某考勤情况的所有员工
            findEmployee: '/api/work/attendance/findEmployeeList4Record', //get

            //考勤统计
            recordNumber: '/api/work/attendance/getAttendanceRecordNumber', //get

            //员工某天的考勤打卡记录
            record4Employee: '/api/work/attendance/getAttendanceRecord4Employee', //get
            
            //我的排班(week)
            planList: '/api/work/attendance/getSchedulingPlanList', //get
            
            //我的排班(month)
            planList4Month: '/api/work/attendance/getSchedulingPlanList4Month', //get
            
        },
        
        
        //工单处理
        task: {
            //列表
            list: '/api/work/event/getEventReportListByType',
            
            //详情,包括抢单/签收详情
            detail: '/api/work/event/getEventReportDetail',
            
            //执行报事流程/领导审核通过/领导审核不通过/办理/派工
            execute: '/api/work/event/executeEventReportFlow',
            
            //获取派办理人列表
            dispatchList: '/api/work/event/getDispatchingWorker',
            
            //获取所有部门领导/审批人
            auditor: '/api/work/event/getDepartmentDirectorList',
            
            //默认审批人
            defaultAuditor: '/api/work/event/getDefaultAcceptor',
            
            //审核时的下一级办理人
            nextOperator: '/api/work/event/getDepartmentWorker',
            
            //撤回
            withdraw: '/api/work/event/withdrawEventReport',
            
            //退回
            sendBack: '/api/work/event/sendBackEventReport',
            
            //派单
            distributeLeaflets: '/api/work/event/updateEventProcessOrder',
        },
        
        
        /*
         * 报事相关
         */
        report: {
            //创建报事
            create: '/api/work/event/createEventReport',
            
            //查询历史报事列表
            history: '/api/work/event/getEventReportList',
            
            //查找报事相关负责人/参与人
            workflow: '/api/work/event/getEventStaffList',
            
            //创建评价
            comment: '/api/work/event/createEventAccepterEval',
            
            //报事列表
            list: '/api/work/event/listEventReport',
            
            //报事处理详情
            detail: '/api/work/event/getEventReport',
            
            //派单
            dispatch: '/api/work/event/updateEventReportByOrder',
            
            //直接反馈
            feedback: '/api/work/event/updateEventReportByFeedback',
            
        },
        
        
        /**
         * 审批工作流
         */
        workflow: {
            //头部数据, 待审批,已审批列表
            getCount: '/api/work/workFlow/getCountsToHead',
            
            //approval页面调用
            getProcessList: '/api/work/workFlow/getProcessList',
            
            //获取表单字段
            getFields: '/api/work/workFlow/getFields',
            
            getValue: '/api/work/workFlow/getValue',
            
            //列表数据
            approvalList: '/api/work/workFlow/getListData',
            
            //获取当前步骤，在这里可以获取taskId
            currentTask: '/api/work/workFlow/getActiveTask',
            
            //获取下一个步骤
            nextTask: '/api/work/workFlow/getNextTask',
            
            //获取办理人列表
            processorList: '/api/work/workFlow/getUser',
            
            //开始流程
            startOrExecute: '/api/work/workFlow/startOrExecute',
            
            //流程日志、历史
            history: '/api/work/workFlow/getHistTask',
            
            //收回流程
            recall: '/api/work/workFlow/backTask',
            
            //删除流程
            delete: '/api/work/workFlow/deleteOrder',
        },
        
        /*
         * 小区模块
         */
        community: {
            //获取通知未读数量
            unread: '/api/work/project/getNoticeUnreadCount',
        },
        
        
        /**
         * 工作台（通知,日常任务）
         */
        worktable: {
            //待审核列表
            checkList: '/api/work/workbench/getNoticeForCheckList',
            
            //待发布列表
            publishList: '/api/work/workbench/getNoticeForPublishList',
            
            //获取通知的数量【待审核，待发布，新通知数量,管理制度】
            num: '/api/work/workbench/getNoticeNumber',
            
            //获取任务数量
            taskNum: '/api/work/workbench/getTaskCount',
            
            //任务列表
            taskList: '/api/work/workbench/getTaskList',
            
            //获取任务详情
            getTask: '/api/work/workbench/getTask',
            
            //办理任务【确认、反馈、审核】
            updateTask: '/api/work/workbench/updateTask',
            
            deleteTask: '/api/work/workbench/deleteTask',
            
            //通告审核通过
            pass: '/api/work/workbench/noticeCheckPass',
            
            //通告审核不通过
            refuse: '/api/work/workbench/noticeCheckRefuse',
            
            //发布通告
            noticePublish: '/api/work/workbench/noticePublish',
            
            //管理制度列表
            adminList: '/api/work/workbench/getNoticesList',
            
            //获取日常任务办理人
            getDailyWorkStaff: '/api/work/workbench/getStaffList',
            
            //新建日常任务
            createDailyWork: '/api/work/workbench/createTask',
            
        },
        
        /**
         * 通知
         */
        notice: {
            //获取通知列表
            getNoticesList: '/api/work/project/getNoticesList',
            
            //保存通知信息
            saveNoticeBrowse: '/api/work/project/saveNoticeBrowse',
            
            //获取通知信息
            getNotice: "/api/work/project/getNotice",
            
            getManagementList: '/api/work/workbench/getNoticesList',
        },
        
        /**
         * 员工模块
         */
        staff: {
            //获取员工信息
            getStaff: '/api/work/staff/getStaff',
            
            //更新员工信息
            updateStaff: '/api/work/staff/updateStaff'
        },
        /**
         * 报事统计
         * **/
        statistics: {
            //报事统计数量
            reportCount: '/api/work/event/getEventReportCount',

            //报事统计列表
            ReportListByStatus:'/api/work/event/getEventReportListByStatus',
        },
        
    };
}(liefeng, window));
